<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>菜品类别编辑</title>
    <link href="https://cdn.bootcss.com/twitter-bootstrap/3.0.1/css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" th:href="@{/layui/css/layui.css}">
    <i th:replace="~{common :: baseUrl}"></i>
</head>
<body>
<form class="layui-form layui-form-pane" action=""  lay-filter="example">


    <div class="container">
        <div class="row clearfix">
            <div class="col-md-6 column">
                <div class="layui-form-item" style="height: 50px">
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">名字</label>
                    <div class="layui-input-inline">
                        <input type="text" readonly name="name" lay-verify="required"  th:value="${personnelStaff.name}" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>



                <div class="layui-form-item"  pane="">
                    <label class="layui-form-label">性别</label>
                    <div class="layui-input-block">
                        <input type="radio" name="sex" value="男" title="男" th:checked='${personnelStaff.sex == "男"}' th:disabled='${personnelStaff.sex != "男"}'>
                        <input type="radio" name="sex" value="女" title="女" th:checked='${personnelStaff.sex == "女"}' th:disabled='${personnelStaff.sex != "女"}'>

                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">年龄</label>
                    <div class="layui-input-inline">
                        <input type="text" name="age" readonly   th:value="${personnelStaff.age}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">身份证</label>
                    <div class="layui-input-inline">
                        <input type="text" name="identityCard" readonly  th:value="${personnelStaff.identityCard}" lay-verify="identity" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">出生日期</label>
                        <div class="layui-input-inline" >
                            <input type="text" class="layui-input" readonly name="birthDate" th:value="${personnelStaff.birthDate}" id="birthDate" placeholder="yyyy-MM-dd">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">学历</label>
                    <div class="layui-input-inline">
                        <input type="text" name="educationBackground"  readonly th:value="${personnelStaff.educationBackground}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">学位</label>
                    <div class="layui-input-inline">
                        <input type="text" name="degree"  readonly th:value="${personnelStaff.degree}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">专业</label>
                    <div class="layui-input-inline">
                        <input type="text" name="specialty" readonly  th:value="${personnelStaff.specialty}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>



            </div>
            <div class="col-md-6 column">

                <div class="layui-form-item">

                    <div class="layui-inline">
                        <label class="layui-form-label">照片</label>
                        <div class="layui-input-inline">
                            <div class="layui-upload">

                                <div class="layui-upload-list">
                                    <input hidden name="picPath" id="picPath" th:value="${personnelStaff.picPath}">
                                    <img width="100px" height="100px" class="layui-upload-img" name="showPic" id="showPic" th:src="${personnelStaff.picPath}">
                                    <p id="uploadText"></p>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">员工编号</label>
                    <div class="layui-input-inline">
                        <input type="text" readonly name="id" lay-verify="required" th:value="${personnelStaff.id}" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">所属部门</label>
                    <div class="layui-input-inline">
                        <select name="departmentId" id="departmentId"  disabled >
                            <option th:each="f : ${personnelDepartmentList}"  th:value="${f.id}" th:text="${f.name}" th:selected="${personnelStaff.departmentId eq f.id}"></option>
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-inline">
                        <label class="layui-form-label">入职日期</label>
                        <div class="layui-input-inline" >
                            <input type="text" class="layui-input" readonly name="entryDate" th:value="${personnelStaff.entryDate}" id="entryDate" placeholder="yyyy-MM-dd">
                        </div>
                    </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">电话</label>
                    <div class="layui-input-inline">
                        <input type="text" name="phone"  readonly th:value="${personnelStaff.phone}" lay-verify="phone" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>


                <div class="layui-form-item">
                    <label class="layui-form-label">住址</label>
                    <div class="layui-input-inline">
                        <input type="text" name="address" readonly  th:value="${personnelStaff.address}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                    </div>
                </div>

                <div class="layui-form-item"  pane="">
                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <input type="radio" name="status" value="0" title="已离职" th:checked="${personnelStaff.status == 0}" th:disabled="${personnelStaff.status != 0}">
                        <input type="radio" name="status" value="1" title="在职" th:checked="${personnelStaff.status == 1}" th:disabled="${personnelStaff.status != 1}">
                        <input type="radio" name="status" value="2" title="请假中" th:checked="${personnelStaff.status == 2}" th:disabled="${personnelStaff.status != 2}">

                    </div>
                </div>

            </div>
        </div>
    </div>







    <div class="layui-form-item" align="center">
        <div class="layui-input-block">

            <button type="button" id="cancel" class="layui-btn ">返回</button>
        </div>
    </div>

</form>



</body>
<script th:src="@{/layui/layui.js}"></script>
<script th:inline="none">
    //JavaScript代码区域
    layui.use(['element','form','upload','layer','laydate'], function() {
        var element = layui.element;
        var form = layui.form;
        var upload = layui.upload;
        var layer = layui.layer;
        var laydate = layui.laydate;
        var $ = layui.$;




        //取消
        $("#cancel").click(function (){
            var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
            parent.layer.close(index); //再执行关闭


        });






    });

</script>
</html>